package org.glickr.api

import groovy.util.slurpersupport.GPathResult
import org.glickr.FlickrServiceException

/* ----------------------------------------------------------------------------------------------------


---------------------------------------------------------------------------------------------------- */

public interface FlickrApiMethod {
    //
    //  API METHOD
    //
    String apiMethod = ""

    //
    //  VALIDATOR
    //
    Closure validatorClosure = { Object dummy ->
        return [validated:true]
    }

    //
    //  PARAMS
    //
    Closure paramsClosure = { Object dummy ->
        [:]
    }

    //
    //  PROCESSOR
    //
    Closure processorClosure = { GPathResult response, Object dummy ->
        return dummy
    }

    //
    //  ERRORS
    //
    Closure errorsClosure = { GPathResult response ->
        return new FlickrServiceException()
    }
}